//package com.lcy.springtest;
//
//import com.lcy.springtest.conf.MyConfig;
//import org.springframework.context.annotation.AnnotationConfigApplicationContext;
//
//import java.util.Arrays;
//
///**
// * @author lichenyang
// * @create 2021-04-15 9:27 下午
// */
//public class ModuleRegisterMainTest {
//    public static void main(String[] args) {
////        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
////        Person bean = applicationContext.getBean(Person.class);
////        System.out.println(bean);
////        Person bean = applicationContext.getBean(Person.class);
////        System.out.println(bean);
//        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);
//        String[] beanNamesForType = applicationContext.getBeanDefinitionNames();
//        Arrays.stream(beanNamesForType).forEach(System.out::println);
//
//        Object colorFactoryBean = applicationContext.getBean("colorFactoryBean");
//        System.out.println("colorFactoryBean: " + colorFactoryBean.getClass());
//    }
//}
